{% extends 'base.html' %}
{% load mytags %}
{% load markup %}
{% block css %}
    <link rel="stylesheet" href="/site_media/prettify.css">
    <link href="/site_media/wmd/wmd.css/" rel="stylesheet">
    <link rel="stylesheet" href="/site_media/css/blog.css"/>
{% endblock %}
{% block contentBlog %}
 <script type="text/javascript">
    /*300*75 创建于 2014-11-25*/
    var cpro_id = "u1826593";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/s.js" type="text/javascript"></script>
<script type="text/javascript">
    /* 创建于 2014-11-23*/
    var cpro_id = "u1822341";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/cnw.js" type="text/javascript"></script>
<!--blog-->
        <div class="media-body">
          <h3 class="text-center"><span class="Tblog">{{ blog.title }}</span></h3>
            <hr style="margin: 10px 0;" />
            <p class="small text-muted">
              坤子
              发布于 {{ blog.add_date|fun }} &nbsp;&nbsp;
              持续热度：{{ blog.counts }}℃&nbsp;&nbsp;
              类别：<a href="/blog/type/{{ blog.type}}/" class="label label-warning small">{{ blog.getType.name }}</a>
              {% if blog.getTags %}&nbsp;&nbsp;标签：{% for i in blog.getTags %}<a href="/blog/tag/{{ i.tag.id }}/" class="label label-danger small">{{ i.tag.name }}</a> {% endfor %}{% endif %}
              {% if user.is_active %}
                &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" class="text-info" onclick="delBlog({{ blog.id }})">删除</a>
                &nbsp;&nbsp;&nbsp;&nbsp;<a href="/manage/add/?id={{ blog.id }}" class="text-danger" id="edit_">编辑</a>
              {% endif %}<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_mshare" data-cmd="mshare" title="分享到一键分享"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{"tsina":"3102998672","tqq":"de21d1e6c6cf0712146e72e5fc8ed3ab"},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
            </p>
            <hr/>
    {{ blog.content_show }}
    <!--警告-->
    <hr/>
    <div class="alert">
       <div class="row" style="color: #999;">
               <p>作者：坤子</p>
               <p>网址: <a href="{{ request.session.domain }}{{ request.path }}">{{ request.session.domain }}{{ request.path }}</a></p>
               本文版权归作者，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。</div>
       </div>
    </div>
<p>{% if pn.pre %}<a href="/blog/{{ pn.pre }}/"><span class="label label-info"><i class="icon-arrow-left icon-white"></i>&nbsp;上一篇：{{ title_pre }}</span></a>{% endif %}
   {% if pn.next %}<a href="/blog/{{ pn.next }}/" style="float: right"><span class="label label-info"><i class="icon-arrow-right icon-white"></i>&nbsp;下一篇：{{ title_next }}</span></a>{% endif %}
</p>
   <hr/>
<!-- 多说评论框 start -->
 <div class="ds-thread" data-thread-key="{{ id }}" data-title="{{ blog.title }}" data-url="{{ request.session.domain }}{{ request.path }}">
 </div>
<!-- 多说评论框 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script src="/site_media/prettify.js"></script>
<script type="text/javascript">
var duoshuoQuery = {short_name:"xuyukunlog"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0]
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
<!-- 多说公共JS代码 end -->
{% endblock %}
{% block js %}
    <script>
    $(function(){
        // 图片处理
         $('.panel-body').find('img').each(function(){
             $(this).addClass('img-thumbnail');
              var img_w = $(this).width();//图片宽度
               var img_h = $(this).height();//图片高度
               if(img_w>800){//如果图片宽度超出容器宽度--要撑破了
                    var height = (img_w*img_h)/img_w; //高度等比缩放
                    $(this).css({"width":img_w,"height":height});//设置缩放后的宽度和高度
                }
             //$(this).css('width', '800px');
         })
        // 代码高亮
        $("pre").addClass("prettyprint linenums");
        prettyPrint();
    })
    </script>
{% endblock %}
